package view;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Polygon;

import model.BigAnt;

public class BigAntView implements Paintable {

	private BigAnt bigant;
	
	BigAntView(BigAnt ba){
		bigant=ba;
	}
	
	@Override
	public void paint(Graphics g) {
		int loc_x=(int)bigant.get_x();
		int loc_y=(int)bigant.get_y();
		
		  g.setColor(Color.black);
		  Polygon p=new Polygon();
		  p.addPoint(loc_x-7, loc_y+5);
		  p.addPoint(loc_x+7, loc_y+5);
		  p.addPoint(loc_x, loc_y-15);
		  if(!bigant.isGoingHome()){
		  g.drawPolygon(p);
		  }
		  else{
		  g.fillPolygon(p);
		  }
	}

	@Override
	public boolean alive() {
		return bigant.getIsAlive();
	}

}
